﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Robin.Domain.Repositories;
using Robin.NHibernate;
using Robin.NHibernate.Repositories;

namespace Smart.Project.Data
{

    /// <summary>
    /// 万米单元网格仓储
    /// </summary>
    public class ProjectinfoRepository : NhRepositoryBase<MProjectinfo, string>, IProjectinfoRepository
    {
        public ProjectinfoRepository(ISessionProvider sessionProvider)
           : base(sessionProvider)
        {
        }

        /// <summary>
        /// 根据条件,排序方式,页码及每页个数获取数据获取数据
        /// </summary>
        /// <param name="predicate">条件</param>
        /// <param name="order">排序方式</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">每页个数</param>
        /// <returns></returns>

        public IEnumerable<MProjectinfo> GetList(Expression<Func<MProjectinfo, bool>> predicate, Action<Orderable<MProjectinfo>> order, int pageIndex, int pageSize)
        {
             return Get(predicate, order, pageIndex, pageSize);
        }
    }
}
